<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <p v-if="status === 1">当status为1时显示该行</p>
        <p v-else-if="status === 2">当status为2时显示该行</p>
        <p v-else>否则显示该行</p>
    </div>
    <div id="app1">
        <ul>
            <li v-for="(b,index) in friuts">
                {{index+1}}-{{b.name}}-{{b.price}}
            </li>
            <li v-for="(u,key,index) in user">
                {{index+1}}-{{key}}-{{u}}
            </li>
        </ul>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue"></script>

    <script>
        var app = new Vue({
            el: '#app',
            data: {
                status: 4
            }
        })

        var app1 = new Vue({
            el: '#app1',
            data: {
                friuts: [
                    { name: '雷霆嘎巴', price: 30 },
                    { name: '小鸟伏特加', price: 100 },
                    { name: 'giao', price: 20 },
                    { name: '我giao', price: 10 },
                ],
                user: {
                    username: 'admin',
                    passwordd: '123456',
                    trlphone: '123456789'
                }
            }, 
            computed: {
                friutSort: function () {
                    return this.friuts.sort(function (a, b) {
                        return a.price -  b.price;
                    })
                }
            }
        })
    </script>
</body>

</html>